from django.contrib import admin

# Register your models here.
from apps.blog.models import Collect, province, city


class GlobalSettings(object):
    site_title = "后台管理系统"
    site_footer = "后台管理系统"
    # menu_style = "accordion"


class BaseSettings(object):
    enable_themes = True
    use_bootswatch = True


class CollectAdmin(admin.ModelAdmin):
    # fields = ['publish_date', 'content']
    #展示
    list_display = ['name', 'type', ]
    search_fields = ['name', 'type',]
    list_filter = ['type']
    # list_editable = ["name", "type"]
    # readonly_fields = ["name"]
    # # exclude = ["click_nums", "fav_nums"]
    # ordering = ["name"]
    # # inlines = [LessonInline, CourseResourceInline]


class ProvinceAdmin(admin.ModelAdmin):
    # fields = ['publish_date', 'content']
    #展示
    list_display = ['name', 'value']
    search_fields = ['name']
    list_filter = ['name']

class CityAdmin(admin.ModelAdmin):
    # fields = ['publish_date', 'content']
    #展示
    list_display = ['name', 'value']
    search_fields = ['name']
    list_filter = ['name']

admin.site.register(Collect, CollectAdmin)
admin.site.register(province, ProvinceAdmin)
